
'use strict';
// 意见反馈
module.exports = {
  up: async (queryInterface, Sequelize) => {
    const { INTEGER, STRING, DATE, ENUM } = Sequelize;
    // 创建表
    await queryInterface.createTable('feedback', {
      id: {
        type: INTEGER(30).UNSIGNED,
        primaryKey: true,
        autoIncrement: true
      },
      wx_id:{
        type: INTEGER(30),
        allowNull: false,
        defaultValue:0,
        comment: '微信id',
      },
      wxname: {
        type: STRING(100),
        allowNull: false,
        defaultValue:'',
        comment: '微信昵称',
      },
      type: {
        type: STRING(200),
        allowNull: false,
        defaultValue: '',
        comment: '反馈类型',
      },
      content: {
        type: STRING(200),
        allowNull: false,
        defaultValue: '',
        comment: '内容',
      },
      images: {
        type: STRING(1000),
        allowNull: false,
        defaultValue: '',
        comment: '图片',
      },
      created_at: DATE,
      updated_at: DATE,
    });
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.dropTable('feedback');
  }
};